package com.cx.mall.api.user;

import com.cx.mall.api.interceptor.HeaderInterceptor;
import com.cx.mall.common.model.user.UserInfo;
import com.cx.mall.common.utils.ResponseVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient(contextId = "userInfo",name = "mall-user-service"
,fallbackFactory = ResponseVO.class,configuration = HeaderInterceptor.class)
public interface UserInfoFeign {

    /**
     * 用户注册接口
     * @param userInfo 用户信息对象，包含注册所需的基本信息
     * @return ResponseVO 注册结果响应对象，包含注册成功或失败的信息
     */
    @PostMapping("/user/register")
    public ResponseVO register(@RequestBody UserInfo userInfo);
}
